package com.iretailer.report.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @Auther: xjw
 * @Date: 2019/1/18 15:43
 * @Description:
 */
@Data
@TableName(value = "s_users")
public class User {

    @JSONField(name = "Id")
    @TableId(value = "Id")
    private String id;

    @JSONField(name = "ParentId")
    @TableField(value = "ParentId")
    private String parentId;

    @JSONField(name = "Name")
    @TableField(value = "Name")
    private String name;


    @JSONField(name = "UserCode")
    @TableField(value = "UserCode")
    private String userCode;

    @JSONField(name = "Email")
    @TableField(value = "Email")
    private String email;


    //创建时间
    @JSONField(name = "CreateTime", format = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "CreateTime")
    private LocalDateTime createTime;

    //创建人
    @JSONField(name = "CreateUser")
    @TableField(value = "createUser")
    private String createUser;

    // 0是默认， 1为删除
    @JSONField(name = "DeleteFlag")
    @TableField(value = "DeleteFlag")
    private String deleteFlag;

    // 0是默认，1 为锁定
    @JSONField(name = "IsLock")
    @TableField(value = "IsLock")
    private Integer isLock;

    @JSONField(name = "LockTime", format = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "LockTime")
    private LocalDateTime lockTime;


    @JSONField(name = "Mobile")
    @TableField(value = "mobile")
    private String mobile;


    @JSONField(name = "RoleId")
    @TableField(value = "roleId")
    private String roleId;

    @JSONField(name = "Telephone")
    @TableField(value = "Telephone")
    private String telephone;

    @JSONField(name = "TryTimes")
    @TableField(value = "TryTimes")
    private Integer tryTimes;

    @JSONField(name = "UpdateTime", format = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "UpdateTime")
    private LocalDateTime updateTime;

    @JSONField(name = "UpdateUser")
    @TableField(value = "UpdateUser")
    private String updateUser;

    @JSONField(name = "UserPwd")
    @TableField(value = "UserPwd")
    private String userPwd;

    //报警等级
    @JSONField(name = "AlarmLevel")
    @TableField(value = "AlarmLevel")
    private String alarmLevel;

    //所属集团
    @JSONField(name = "CompanyId")
    @TableField(value = "CompanyId")
    private String companyId;


    @JSONField(name = "Language")
    @TableField(value = "Language")
    private String language;

    @JSONField(deserialize = true)
    @TableField(exist = false)
    private List<User> children;

    @JSONField(name ="Token")
    @TableField(value = "Token")
    private String token;


}
